package cn.melonlib.aap.user.model.entity;

import cn.melonlib.aap.user.model.enums.AccountType;
import cn.melonlib.cores.commons.model.anno.MelonEntityId;
import cn.melonlib.cores.commons.model.enums.IdType;
import cn.melonlib.cores.commons.model.enums.IdValueType;
import cn.melonlib.cores.commons.model.support.number_id.MelonLibLongTenantRecordEntity;
import cn.melonlib.cores.model.anno.ModelComment;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Type;

import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper = true)
@ModelComment("用户信息")
@Entity(name = "User")
@Table(name = "user_user")
@MelonEntityId(type = IdType.SNOW_FLAKE,IdValueType = IdValueType.LONG)
public class User extends MelonLibLongTenantRecordEntity {

    @ModelComment("用户代码")
    private String code;

    @ModelComment("昵称")
    private String nickName;

    @ModelComment("真实姓名")
    private String realName;

    @ModelComment("联系手机")
    private String mobile;

    @ModelComment("联系电子邮箱")
    private String email;

    @ModelComment("用户头像")
    @Column@Lob@Basic(fetch = FetchType.LAZY)
    @Type(type = "org.hibernate.type.TextType")
    private String avatar;

    @ModelComment("签名")
    @Column@Lob@Basic(fetch = FetchType.LAZY)
    @Type(type = "org.hibernate.type.TextType")
    private String signature;

    @ModelComment("实名认证信息")
    @Column@Lob@Basic(fetch = FetchType.LAZY)
    @Type(type = "org.hibernate.type.TextType")
    private String validationInfo;

    @ModelComment("是否实名认证")
    private Boolean validation;

}
